﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using Ninject;
using Ninject.Syntax;

namespace eBook.WinApp
{
  static class Program
  {
    /// <summary>
    /// The main entry point for the application.
    /// </summary>
    [STAThread]
    static void Main()
    {
      Application.EnableVisualStyles();
      Application.SetCompatibleTextRenderingDefault(false);
      Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);

      Application.Run(new frmMain());
    }



    static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
    {
      string innerMessage = e.Exception.InnerException != null ? e.Exception.InnerException.Message : string.Empty;
      string message = string.Format("İşlem tamamlanamadı.\r\n{0}\r\n\r\nInner Exception:\r\n{1}\r\n\r\nStack Trace:\r\n{2}", e.Exception.Message, innerMessage, e.Exception.StackTrace);
      MessageBox.Show(message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    }





  }
}
